Xbasic

OBJECT.LOCATE_NEXT Function

Syntax

.Locate_Next(C value[, C fieldname])

Arguments

value

The value to find in a field.

fieldname

Optional. Default = all fields. The name of the field to search.

Description

Finds the next record with a value matching Value. Searches all fields unless Fieldname is specified.

Discussion

The <OBJECT>.LOCATE_NEXT() method applies to:

Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)

The <OBJECT>.LOCATE_NEXT() method finds the next record with a field value matching value. Note : If you are searching in an indexed field, the <OBJECT>.FIND() method is faster.

Example

A form has a control called "Find_What" and a button called "Search". When the user presses this button, this script searches for the value in "Find_What". All fields in the record are searched.

Parentform.locate_next(find_what.value)

Limitations

Desktop applications only.

See Also